const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');

module.exports = {
	devtool: 'eval-source-map',
	entry: __dirname + '/app/index.js',
	output: {
		path: __dirname + '/build',
		filename: "bundle.js"
	},
	module: {
		loaders: [
			{
				test: /\.html$/,
				loader: 'html-loader',
				exclude: /node_modules/
			}
		]
	},
	devServer: {
		contentBase: "./",
		historyApiFallback: true,
		inline: true,
		hot: true,
		port: 7070
	},
	plugins: [
		new webpack.HotModuleReplacementPlugin(),
		new HtmlWebpackPlugin({
			template: __dirname + "/app/index.tmpl.html"
		})
	]
}
